﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SupportingMeterialListFrame.ascx.cs" Inherits="MockPrjTeam2.Pages.ControlOrg.SupportingMeterialListFrame" %>



<script type="text/javascript">
    function Confirm_Active() {
        return confirm('Do you want active this Supporting Material');
    }
</script>


                <asp:Panel ID="CurrentListSupportingMaterials" ClientIDMode="Static" runat="server">
                    <div class="titleh">
                        <h3 class="sorting_range">
                            <span>Current List of Supporting Materials </span><span class="right">
                                <asp:LinkButton ID="LinkButtonCreate01" runat="server" CssClass="hg-blue" 
                                CommandName="01" CausesValidation="False"
                                oncommand="LinkButtonCreate_Command" >Create</asp:LinkButton>
                                
                                <asp:CheckBox ID="CbxInactive" runat="server" Text="Include In-active" AutoPostBack="True"
                                    OnCheckedChanged="CbxInactive_CheckedChanged" />
                            </span>
                        </h3>
                    </div>
                    <asp:GridView ID="GridViewSupportingMaterials" CssClass="tablesorter" runat="server"
                        AutoGenerateColumns="False" AllowPaging="True" PageSize="15" AllowSorting="True" 
                        onpageindexchanging="GridViewSupportingMaterials_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField HeaderText="URL" >
                                <ItemTemplate>
                                
                                    <asp:LinkButton ID="LinkButtonUrl" CausesValidation="false" runat="server" CommandName='<%# Eval("SuportingMeterialID") %>' CommandArgument='<%#Eval("IsActive") %>'
                                       OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Active();" : string.Empty %>' OnCommand="LinkButtonUrl_Command" ToolTip="Click here View details and edit"><%# Eval("Url") %></asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Description">
                                <ItemTemplate>
                                    <%#(Eval("Description"))%>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Type">
                                <ItemTemplate>
                                     <%#Eval("Type") %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Added By">
                                <ItemTemplate>
                                    <%#Eval("Account") %>
                                </ItemTemplate>
                                <ItemStyle Width="60px" />
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Added Date">
                                <ItemTemplate>
                                    <%#string.Format("{0:dd/MM/yyyy}",Eval("AddDate"))%>
                                </ItemTemplate>
                                <ItemStyle Width="70px" />
                                <HeaderStyle CssClass="header" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Is Active?">
                                <ItemTemplate>
                                    <%#(bool) Eval("IsActive")?"Yes":"No" %>
                                </ItemTemplate>
                                <HeaderStyle CssClass="header" />
                                <ItemStyle Width="50px" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                        <blockquote>There are no items to show.</blockquote>
                    </EmptyDataTemplate>
                        <PagerStyle CssClass="pagination_table" />
                    </asp:GridView>
                
                </asp:Panel>
      